Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMN-792 Add events service v2 in agreement-platformstate-writer #987

Merged
merged 520 commits into from
Oct 31, 2024

Conversation

taglioni-r
Copy link
Contributor

@taglioni-r taglioni-r commented Sep 18, 2024

[To be merged after #967]

This pull request is for implementing the v2 consumer service in agreement-platformstate-writer.

taglioni-r and others added 29 commits September 24, 2024 10:02
Base automatically changed from IMN-790_agreement-platform-state-writer-scaffold to main October 24, 2024 14:36
Copy link
Contributor

@galales galales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀
only open point IMO is the handling of missing catalog entry

packages/catalog-platformstate-writer/test/utils.test.ts Outdated Show resolved Hide resolved
Comment on lines 161 to 164
if (!catalogEntry) {
// TODO double-check
throw genericInternalError("Catalog entry not found");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the entry has not been found we could be one of these cases

  • the descriptor has been archived right before the upgrade event arrives (bad luck)
  • the descriptor has been archived and this is a reprocess
  • an error has blocked the consumer of catalog events

We should be able to cover all of them by setting the INACTIVE state.
In theory in this case other descriptor details (eg audience) should be left blank. Is it feasible in your opinion?

@taglioni-r
Copy link
Contributor Author

We should be able to cover all of them by setting the INACTIVE state.
In theory in this case other descriptor details (eg audience) should be left blank. Is it feasible in your opinion?

I think the easiest solution is ignoring the updates on the descriptor fields if catalog entry is undefined. I am not sure if this covers all the cases.

@galales
Copy link
Contributor

galales commented Oct 31, 2024

I think the easiest solution is ignoring the updates on the descriptor fields if catalog entry is undefined. I am not sure if this covers all the cases.

it works for me

@taglioni-r taglioni-r merged commit b9ffd7e into main Oct 31, 2024
46 checks passed
@taglioni-r taglioni-r deleted the IMN-792_agreement-platform-state-writer-v2 branch October 31, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants